package tedu.shoot;
import java.awt.image.BufferedImage;

public class Bullet extends FlyingObject{
    private int speed;
    public Bullet(int x, int y){
        super(8,20,x,y);
        speed = 5;
    }

    public void step(){
        y -= speed;
    }

    public boolean isOutOfBounds(){
        return y <= -height;
    }

    public BufferedImage getImage() {
        if (isLive()){
            return Images.bullet;
        }else if (isDead()){
            state = REMOVE;
        }
        return null;
    }
}
